package com.fz.us.admin.company.service;

import com.fz.us.admin.base.bean.BaseEnumManager;
import com.fz.us.admin.base.bean.Result;
import com.fz.us.admin.base.bean.search.order.Order;
import com.fz.us.admin.base.bean.search.page.PagePaging;
import com.fz.us.admin.base.bean.search.result.SearchResultList;
import com.fz.us.admin.base.bean.search.result.SearchResultPaging;
import com.fz.us.admin.base.bean.search.rule.Rule;
import com.fz.us.admin.base.service.BaseService;
import com.fz.us.admin.company.entity.Company;
import com.fz.us.admin.company.entity.Group;
import com.fz.us.admin.company.entity.Post;
import com.fz.us.admin.company.entity.User;

import java.util.List;
import java.util.Map;

/**
 * Service接口 - 岗位
 * ============================================================================
 * 版权所有 2016 。
 *
 * @author fallenpanda
 * @version 1.0 2016-08-02 。
 * ============================================================================
 */
public interface GroupService extends BaseService<Group, String> {

	/**
	 * 根据用户查找角色
	 * @param user
	 * @return
	 */
	public List<String> findGroupIdByUser(User user);

	/**
	 * 根据名字来查找群组
	 * @param name
	 * @return
	 */
	public Group findGroupByName(String name);

	/**
	 * 分页 企业下群组
	 *
	 * @param page
	 * @param order
	 * @param company
	 * @return
	 */
	public SearchResultPaging pagingGroup(PagePaging page, List<Rule> rules, Order order, Company company, BaseEnumManager.StateEnum... states);

	/**
	 * 列表 企业下群组
	 *
	 * @param order
	 * @param company
	 * @return
	 */
	public SearchResultList listGroup(List<Rule> rules, Order order, Company company, BaseEnumManager.StateEnum... states);

	/**
	 * 列表 Map
	 *
	 * @param group
	 * @return
	 */
	public Map<String, Object> getListMap(Group group);

}